package com.guochenglang.www.service;

import com.guochenglang.www.pojo.CommentMessage;
import com.guochenglang.www.pojo.LikeMessage;
import com.guochenglang.www.pojo.ReplyMessage;
import com.guochenglang.www.service.anotate.Affair;

import java.sql.SQLException;
import java.util.ArrayList;

/**
 * @author GuoChenglang
 */
public interface MessageService {
    /**
     * 获得他人对你的点赞信息
     *
     * @param userId 用户id
     * @return 点赞信息列表
     * @throws SQLException           sql异常
     * @throws InterruptedException   断点异常
     * @throws IllegalAccessException 非法访问异常
     * @throws InstantiationException 实现异常
     */
    @Affair
    ArrayList<LikeMessage> showLikeMessage(Integer userId) throws SQLException, InterruptedException, IllegalAccessException, InstantiationException;

    /**
     * 获得他人点赞个数
     *
     * @param userId 用户id
     * @return 他人点赞个数
     * @throws SQLException           sql异常
     * @throws InterruptedException   断点异常
     * @throws IllegalAccessException 非法访问异常
     * @throws InstantiationException 实现异常
     */
    int likeMessageCount(Integer userId) throws SQLException, InterruptedException, IllegalAccessException, InstantiationException;

    /**
     * 删除他人点赞信息
     *
     * @param messageId 信息的id
     * @return 删除行数
     * @throws SQLException           sql异常
     * @throws InterruptedException   断点异常
     * @throws IllegalAccessException 非法访问异常
     */
    @Affair
    int deleteLikeMessage(Integer messageId) throws SQLException, InterruptedException, IllegalAccessException;

    /**
     * 获得他人评论信息个数
     *
     * @param userId 用户id
     * @return 他人评论信息个数
     * @throws SQLException           sql异常
     * @throws InterruptedException   断点异常
     * @throws IllegalAccessException 非法访问异常
     * @throws InstantiationException 实现异常
     */
    int commentCount(Integer userId) throws SQLException, InterruptedException, IllegalAccessException, InstantiationException;

    /**
     * 获取他人点赞信息列表
     *
     * @param userId 用户id
     * @return 点赞信息列表
     * @throws SQLException           sql异常
     * @throws InterruptedException   断点异常
     * @throws IllegalAccessException 非法访问异常
     * @throws InstantiationException 实现异常
     */
    @Affair
    ArrayList<CommentMessage> showCommentMessage(Integer userId) throws SQLException, InterruptedException, IllegalAccessException, InstantiationException;

    /**
     * 删除他人对你的评论消息
     *
     * @param messageId 信息id
     * @return 删除行数
     * @throws SQLException           sql异常
     * @throws InterruptedException   断点异常
     * @throws IllegalAccessException 非法访问异常
     */
    @Affair
    int deleteCommentMessage(Integer messageId) throws SQLException, InterruptedException, IllegalAccessException;

    /**
     * 获取他人回复信息个数
     *
     * @param userId 用户id
     * @return 他人回复信息个数
     * @throws SQLException           sql异常
     * @throws InterruptedException   断点异常
     * @throws IllegalAccessException 非法访问异常
     * @throws InstantiationException 实现异常
     */
    int replyCount(Integer userId) throws SQLException, InterruptedException, IllegalAccessException, InstantiationException;

    /**
     * 获得他人回复信息列表
     *
     * @param userId 用户id
     * @return 他人回复消息列表
     * @throws SQLException           sql异常
     * @throws InterruptedException   断点异常
     * @throws IllegalAccessException 非法访问异常
     * @throws InstantiationException 实现异常
     */
    @Affair
    ArrayList<ReplyMessage> showReplyMessage(Integer userId) throws SQLException, InterruptedException, IllegalAccessException, InstantiationException;

    /**
     * 删除回复消息
     *
     * @param messageId 消息id
     * @return 删除个数
     * @throws SQLException           sql异常
     * @throws InterruptedException   断点异常
     * @throws IllegalAccessException 非法访问异常
     */
    @Affair
    int deleteReplyMessage(Integer messageId) throws SQLException, InterruptedException, IllegalAccessException;
}
